<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
    <title>移动下单</title>

    <style type="text/css">
        .slider-pager {
            display: none;
        }

        .myClass {
            background: #4a87ee;
            border-radius: 25px;
            float: right;
            margin-right: 10px;
            padding: 5px 8px;
            color: #fff;
        }
    </style>

    <script type="text/javascript" src="common.js"></script>
</head>
<body ng-controller="myController">
<form name="myForm">
    <ion-nav-bar class="bar-positive">
        <ion-nav-back-button class="button-clear" hidden="true">
            <i class="icon ion-ios-arrow-back"></i>
        </ion-nav-back-button>
    </ion-nav-bar>

    <ion-nav-view>

    </ion-nav-view>


    <!-- 移动下单主画面-->
    <script id="Home.html" type="text/ng-template">
        <ion-view hide-back-button="true" title="{{mytemp.UserName}}">
            <div class="bar bar-subheader bar-stable">
                <h2 class="title">{{mytemp.OrgName}}</h2>
            </div>
            <ion-content>
                <div class="list" style="top:88px;">
                    <a class="item item-icon-right" on-tap="sendpagename('全部订单')">
                        全部订单
                        <span class="myClass">{{mytemp.myordercount}}</span> <i class="icon ion-ios-arrow-right"></i>
                    </a>
                    <a class="item item-icon-right" on-tap="sendpagename('待提交订单')">
                        待提交订单
                        <span class="myClass">{{mytemp.UnSubmitCount}}</span>
                        <i class="icon ion-ios-arrow-right"></i>
                    </a>
                    <a class="item item-icon-right" on-tap="sendpagename('待审核订单')">
                        待审核订单
                        <span class="myClass">{{mytemp.UnApproveCount}}</span>
                        <i class="icon ion-ios-arrow-right"></i>
                    </a>
                    <a class="item item-icon-right" on-tap="sendpagename('待发货订单')">
                        待发货订单
                        <span class="myClass">{{mytemp.UnThingCount}}</span>
                        <i class="icon ion-ios-arrow-right"></i>
                    </a>
                    <a class="item item-icon-right" on-tap="sendpagename('待立账订单')">
                        待立账订单
                        <span class="myClass">{{mytemp.LizhangCount}}</span>
                        <i class="icon ion-ios-arrow-right"></i>
                    </a>
                </div>
            </ion-content>

            <div class="bar bar-footer bar-light">
                <div class="button-bar">
                    <a class="button   button-positive" ng-click="goSoHead()">下 单</a>
                </div>
            </div>
        </ion-view>
    </script>

    <!-- 单据列表画面-->
    <script id="OrderList.html" type="text/ng-template">
        <ion-view hide-back-button="true" title="{{pagename}}" class="padding">
            <div class="bar bar-subheader" style="border-bottom: none;padding: 5px 0;display: block;">
                <div class="item-input-inset">
                    <label class="item item-input item-select select-style-fix">
                        <select ng-model="temptest.filterstate" ng-change="mySelectFunction()">
                            <option value="0" selected>--全部--</option>
                            <option value="1">今天</option>
                            <option value="2">本周</option>
                            <option value="3">本月</option>
                            <option value="5">本年</option>
                        </select>
                    </label>

                    <div class="item-input-wrapper wrapper-fix">
                        <label class="item-input-wrapper">
                            <i class="icon ion-ios-search placeholder-icon"></i>
                            <input type="search" placeholder="客户/订单编码" ng-model="temptest.filtervalue"></label>
                        <button class="button button-small button-positive" ng-click="searchOrderaClick()">查 询</button>
                    </div>
                </div>
                <div class="button-bar">
                    <button class="button {{tempFlag1}}" style="width:50%;" ng-click="showDateDiv()">日 期</button>
                    <button class="button {{tempFlag2}}" style="width:50%;" ng-click="showCusDiv()">客 户</button>
                </div>
            </div>
            <ion-nav-buttons side="right">
                <a class="button button-icon icon" ng-if="orderlistToolbtnflag"
                   ng-click="orderlistshowActionsheet()">编辑</a>
                <a class="button button-icon icon " ng-if="orderlistcancelbtnflag"
                   ng-click="orderlistcanceloption()">取消</a>
            </ion-nav-buttons>

            <ion-nav-buttons side="left">

                <a class="button button-icon ion-arrow-left-c" ng-click="orderlistrouteoption()"></a>
            </ion-nav-buttons>
            <ion-content class="order-list-content">
                <div class="item item-icon-right item-padding-fix" ng-repeat="x in SOHeadArr|orderBy:dateFlag:true">
                    <li class="item item-checkbox checkbox-fix">
                        <label ng-show="checkedFlag" class="checkbox">
                            <input ng-model="x.checked" type="checkbox" name="userchecked" value="{{x.ID}}"></label>

                        <div class="row row-fix">
                            <div class="col">{{x.DocNo}}</div>
                            <div class="col col-fix">{{x.Customer.Name}}</div>
                        </div>
                        <div class="row row-fix">
                            <div class="col">{{x.BusinesDate}}</div>
                            <div class="col col-fix">{{x.Currency.Symbol}}{{x.TotalMoney}}</div>
                        </div>
                    </li>
                    <a class="icon ion-ios-arrow-right" ng-click="sendId({{x.ID}})"></a>
                </div>
                </br></br>
                <div class="list" ng-show="cusFlag"></div>
            </ion-content>
            <div class="bar bar-footer bar-light"
                 ng-show="orderlistsubmitbtnflag||Orderlistdeletebtnflag">
                <div class="button-bar" ng-if="orderlistsubmitbtnflag">
                    <a class="button  button-positive" name="submitbtn" ng-click="OrderlistsubmitChecked()">提 交</a>
                </div>
                <div class="button-bar" ng-if="Orderlistdeletebtnflag">
                    <a class="button button-positive" ng-click="orderlistdeleteItem()">删 除</a>
                </div>
            </div>
        </ion-view>
    </script>

    <!-- 订单头明细画面-->
    <script id="OrderHeadDetail.html" type="text/ng-template">
        <ion-view hide-back-button="true" title="{{SOHeadArr[tempIndex].DocNo}}" class="padding">
            <ion-nav-buttons side="right">
                <a class="button button-icon icon" ng-if="orderheaddetaileditflag"
                   ng-click="orderheaddetaileditclick()">编辑</a>
                <a class="button button-icon icon" ng-if="orderheaddetailcancelflag"
                   ng-click="orderheaddetailcancelclick()">取消</a>
            </ion-nav-buttons>
            <ion-nav-buttons side="left">
                <a class="button button-icon ion-arrow-left-c" ng-click="orderheaddetailrouteoption()"></a>
            </ion-nav-buttons>
            <ion-content>
                <div class="list list-inset">

                    <div ng-show="visibile">{{INDEX}}</div>

                    <label class="item item-input">
                        <span class="list-lable-fix" style="width:120px">客户名称</span>

                        <input type="text" ng-disabled="true" value="{{SOHeadArr[tempIndex].Customer.Name}}"/>
                    </label>

                    <label class="item item-input">
        <span class="list-lable-fix" style="
        font-size:16px;font-weight:normal;width:115px">单据日期</span>
                        <!--input type="date" ng-disabled="true" ng-model="selectdate" style="display:inline-block"
                               ng-init="selectdate=selectdate"-->
                        <label style="width:50%;">{{selectdate}}</label>

                        <button id="selectdate" class="button button-icon ion-calendar"
                                style="font-size:30px;border:0px;width:20%;"
                                ng-click="selectMyDate($event)">
                        </button>
                    </label>

                    <label class="item  item-input">
                        <span class="list-lable-fix" style="width:120px">合计金额</span>

                        <input type="text" ng-disabled="true"
                               value="{{SOHeadArr[tempIndex].Currency.Symbol}}{{SOHeadArr[tempIndex].TotalMoney}}"/>
                    </label>
                    <label class="item  item-input">
                        <span class="list-lable-fix" style="width:120px">单据状态</span>

                        <input type="text" ng-disabled="true" value="{{Status}}"/>
                    </label>

                    <div class="item item-input">
                        <span class="list-lable-fix" style="width:120px">订单行数</span>
                        <input type="text" ng-disabled="true" value="{{SOHeadArr[tempIndex].SoLines.length}}"/>
                        <button class="button button-clear button-dark" style="position:absolute;right:0px;top:0px;"
                                ng-click="orderheaddetailgetLineList()">
                            <i class="icon ion-ios-arrow-right"></i>
                        </button>
                    </div>

                </div>
            </ion-content>
            <div class="bar bar-footer bar-light">
                <div class="button-bar">
                    <a class="button  button-positive" ng-if="orderheaddetailaddlineflag"
                       ng-click="orderheaddetailaddlineclick()">增 行</a>
                </div>
            </div>

        </ion-view>
    </script>

    <!-- 订单行列表画面-->
    <script id="OrderLineList.html" type="text/ng-template">
        <ion-view hide-back-button="true" title={{SOHeadArr[tempIndex].DocNo}} class="padding">
            <ion-nav-buttons side="right">
                <a class="button button-icon icon" ng-if="OrderLineListeditflag" ng-click="OrderLineListeditclick()">删
                    行</a>
                <a class="button button-icon icon" ng-if="OrderLineListcancelflag"
                   ng-click="OrderLineListdeletelineclick()">完 成 </a>
                <!--aclass="button button-icon icon" ng-if="OrderLineListeditflag" ng-click="OrderLineListeditclick()">编辑</a-->
                <!--a class="button button-icon icon" ng-if="OrderLineListcancelflag" ng-click="OrderLineListcancelclick()">取消</a-->
            </ion-nav-buttons>
            <ion-nav-buttons side="left">
                <a class="button button-icon ion-arrow-left-c" ng-click="OrderLineListrouteoption()"></a>
            </ion-nav-buttons>
            <ion-content>

                <div class="item item-icon-right item-padding-fix" ng-repeat="x in SOHeadArr[tempIndex].SoLines">

                    <li class="item item-checkbox checkbox-fix">
                        <label ng-show="OrderLineListcheckedflag" class="checkbox">
                            <!--label  ng-show="OrderLineListcheckedflag" class="checkbox"-->
                            <input ng-model="$index" type="checkbox" name="usercheckedline" value="{{x.ID}}"></label>

                        <div>
                            <div class="row row-fix">
                                <div class="col">行号{{x.Linenum}}</div>
                                <div class="col col-fix"></div>
                            </div>
                            <div class="row row-fix">
                                <div class="col">{{x.ItemInfo.Name}}</div>
                                <div class="col col-fix">{{x.OrderByQtyPU}}{{x.UN.Name}}</div>
                            </div>
                            <div class="row row-fix">
                                <div class="col">{{x.RequireDate}}</div>
                                <div class="col col-fix">{{SOHeadArr[tempIndex].Currency.Symbol}}{{x.TotalMoney}}</div>
                            </div>
                        </div>
                    </li>
                    <i class="icon ion-ios-arrow-right" ng-click="sendsolinelistindex($index)"></i>
                </div>
            </ion-content>

            <div class="bar bar-footer bar-light">
                <div class="button-bar">
                    <a class="button  button-positive" ng-if="OrderLineListaddlineflag"
                       ng-click="OrderLineListaddlineclick()">增 行</a>
                    <!--a class="button  button-positive" ng-if="OrderLineListaddlineflag" ng-click="OrderLineListaddlineclick()">增 行</a-->
                </div>
                <!--div class="button-bar"-->
                <!--a class="button button-assertive" ng-if="OrderLineListdeletelineflag" ng-click="OrderLineListdeletelineclick()">删 行</a-->
            </div>
            </div>
        </ion-view>
    </script>

    <!--订单行明细画面-->
    <script id="SoLineDetail.html" type="text/ng-template">
        <ion-view hide-back-button="true"
                  title="{{SOHeadArr[tempIndex].DocNo}}-{{myList[slideIndex].Linenum}}">
            <ion-nav-buttons side="left">
                <button class="button button-positive button-clear ion-arrow-left-c"
                        style="font-size:30px;display:none;" ng-click="previous()"></button>
                <a class="button button-icon ion-arrow-left-c" ng-click="SoLineDetailrouteoption()"></a>
            </ion-nav-buttons>

            <ion-nav-buttons side="right">
                <a class="button button-icon icon" ng-if="SoLineDetaileditflag"
                   ng-click="SoLineDetaileditclick()">编辑</a>
                <a class="button button-positive" ng-if="SoLineDetailSaveflag" ng-click="SoLineDetailSaveclick()"
                   style="top:8px">保 存</a>
                <!--a class="button button-icon icon" ng-if="SoLineDetailcancelflag" ng-click="SoLineDetailcancelclick()">取消</a-->
                <button class="button button-positive button-clear ion-arrow-right-c"
                        style="font-size:30px;display:none;" ng-click="nextSlide()"></button>
            </ion-nav-buttons>

            <ion-content>
                <ion-slide-box on-slide-changed="slideChanged(index)">
                    <ion-slide ng-repeat="x in myList">
                        <div class="list list-inset">

                            <label class="item item-input">
                                <span class="list-lable-fix" style="width:160px;">物料编码</span>
                                <input type="text" ng-disabled="true" value="{{x.ItemInfo.Code}}"/>

                            </label>

                            <div class="item item-input">
                                <span class="list-lable-fix" style="width:160px;">物料名称</span>
                                <input type="text" ng-disabled="true" value="{{x.ItemInfo.Name}}"/>
                                <button class="button button-clear button-dark"
                                        style="position:absolute;right:0px;top:0px;" ng-click="SoLineDetailModifyItem()"
                                        ng-if="SOLineDetailItemArrowFlag">
                                    <i class="icon ion-ios-arrow-right"></i>
                                </button>
                            </div>
                            <label class="item item-input">
        <span class="input-label" style="font-size:16px;
      font-weight:normal;width:160px">数量({{x.UN.Name}})</span>
                                <input type="number" min="0" ng-disabled="SOLineDetailItemArrowFlag2"
                                       ng-model="x.OrderByQtyPU" name="linedetail.orderbyqty"
                                       ng-change="solinedetailcalqtytotalmoney()"/>
                            </label>
                            <label class="item item-input ">
        <span class="input-label" style="font-size:16px;
        font-weight:normal;width:160px">单价({{SOHeadArr[tempIndex].Currency.Symbol}})</span>
                                <input type="number" min="0" ng-disabled="SOLineDetailItemArrowFlag2"
                                       ng-model="x.OrderPriceTC" name="linedetail.OrderPriceTC"
                                       ng-change="solinedetailcalqtytotalmoney()"/>
                            </label>
                            <label class="item item-input ">
                                <span class="list-lable-fix"
                                      style="font-size:16px;font-weight:normal;width:160px">交期</span>
                                <!--input type="date" ng-disabled="SOLineDetailItemArrowFlag2" ng-model="x.RequireDate"
                                       ng-init="selectdate=selectdate" style="display:inline-block"-->
                                <label style="width:40%;">{{x.RequireDate}}</label>

                                <button id="x.RequireDate" class="button button-icon ion-calendar"
                                        style="font-size:30px;border:0px;width:20%;"
                                        ng-click="selectMyDate($event)" ng-disabled="SOLineDetailItemArrowFlag2">
                                </button>

                            </label>
                            <label class="item item-input ">
                                <span class="list-lable-fix" style="width:160px">合计金额({{SOHeadArr[tempIndex].Currency.Symbol}})</span>
                                <input type="text" ng-disabled="true" value="{{x.TotalMoney}}"/>

                            </label>
                            <label class="item item-input ">
                                <span class="list-lable-fix" style="width:160px">累计出货量({{x.UN.Name}})</span>
                                <input type="text" ng-disabled="true" value="{{x.SumShipAmount}}"/>

                            </label>
                            <label class="item item-input ">
                                <span class="list-lable-fix" style="width:160px">累计立账量({{x.UN.Name}})</span>
                                <input type="text" ng-disabled="true" value="{{x.SumAccureAmount}}"/>

                            </label>
                            <label class="item item-input ">
                                <span class="list-lable-fix" style="width:160px">累计立账金额({{SOHeadArr[tempIndex].Currency.Symbol}})</span>
                                <input type="text" ng-disabled="true" value="{{x.SumAccureMoney}}"/>

                            </label>
                            <label class="item item-input">
                                <span class="list-lable-fix" style="width:160px">累计收款金额({{SOHeadArr[tempIndex].Currency.Symbol}})</span>
                                <input type="text" ng-disabled="true" value="{{x.SumPayMoney}}"/>

                            </label>
                        </div>
                    </ion-slide>
                </ion-slide-box>
            </ion-content>
            <div class="bar bar-footer bar-light">
                <!--div class="button-bar"-->
                <!--a class="button button-positive"  ng-if="SoLineDetailSaveflag" ng-click="SoLineDetailSaveclick()">保 存</a-->

                <!--/div-->
                {{ bind()}}
            </div>
        </ion-view>
    </script>

    <!--移动下单头画面（新增头）-->
    <script id="SoHead.html" type="text/ng-template">
        <ion-view hide-back-button="true" title="移动下单">
            <ion-nav-buttons side="left">
                <a class="button button-icon ion-arrow-left-c" ng-click="soheadgoback()"></a>
            </ion-nav-buttons>
            <ion-nav-buttons side="right">
                <a class="button" ng-click="confirmCreateOrder()">保存</a>
            </ion-nav-buttons>

            <ion-content>

                <div class="list list-inset">

                    <label class="item item-input order-head">
                        <span class="order-label-head">单号</span>
                    </label>

                    <label class="item item-input order-head" ng-click="GoPage()">
                        <label style="float:right" ng-show="visibile">{{sohead.customercode}}</label>
                        <label style="float:right" ng-show="visibile">{{sohead.customerid}}</label>
                        <label style="float:right" ng-show="visibile">{{sohead.currencyid}}</label>
                        <label style="float:right" ng-show="visibile">{{sohead.currencycode}}</label>
                        <label style="float:right" ng-show="visibile">{{sohead.currencyname}}</label>
                        <label style="float:right" ng-show="visibile">{{sohead.currencysymbol}}</label>
                        <span class="order-label-head">客户</span>
                        <label class="order-label-body">{{sohead.customername}}</label>
                        <!--<button class="button button-clear button-dark" style="position:absolute;right:0px;top:0px;"-->
                        <!--ng-model="sohead.customer">-->
                        <!--<i class="icon ion-ios-arrow-right"></i>-->
                        <!--</button>-->
                        <span class="ion-ios-arrow-right"></span>
                    </label>

                    <label class="item item-input order-head" ng-click="selectMyDate($event)">
                        <span class="order-label-head">交期</span>
                        <label class="order-label-body">{{sohead.requiredate}}</label>
                        <span class="ion-ios-arrow-right"></span>
                    </label>

                    <button class="button button-full order-button" ng-click="goCreateOrderLineList()">
                        订单行：{{linecount}}行
                    </button>

                </div>
            </ion-content>
        </ion-view>
    </script>

    <!-- 下单行列表画面-->
    <script id="CreateOrderLineList.html" type="text/ng-template">
        <ion-view hide-back-button="true" title={{SOHeadArr[tempIndex].DocNo}}>
            <ion-view title={{sohead.docno}}>
                <ion-nav-buttons side="left">
                    <a class="button button-icon ion-arrow-left-c" ng-click="CreateOrderLineListrouteoption()"></a>
                </ion-nav-buttons>
                <ion-nav-buttons side="right">
                    <a class="button" ng-click="CreateOrderLineListdeletelineclick()">删除</a>
                </ion-nav-buttons>
                <ion-content>
                    <div class="item item-icon-right item-padding-fix" ng-repeat="x in lineArr">
                        <li class="item item-checkbox checkbox-fix">
                            <label class="checkbox">
                                <input ng-model="$index" type="checkbox" name="CreateOrderLineListcheckedline"
                                       value="{{x.doclineno}}"></label>

                            <div>
                                <div class="row row-fix">
                                    <div class="col">行号{{x.doclineno}}</div>
                                    <div class="col col-fix"></div>
                                </div>
                                <div class="row row-fix">
                                    <div class="col">{{x.itemname}}</div>
                                    <div class="col col-fix">{{x.orderbyqty}}{{x.puname}}</div>
                                </div>
                                <div class="row row-fix">
                                    <div class="col">{{x.requiredate}}</div>
                                    <div class="col col-fix">{{x.currencysymbol}}{{x.totalmoney}}</div>
                                </div>
                            </div>
                        </li>
                    </div>
                </ion-content>
                <div class="bar bar-footer bar-light">
                    <div class="button-bar">
                        <a class="button  button-positive" ng-click="CreateOrderLineListaddlineclick()">增 行</a>
                    </div>
                    <!--div class="button-bar"-->
                    <!--a class="button button-assertive" ng-click="CreateOrderLineListdeletelineclick()">删 行</a-->
                    <!--/div-->
                </div>
            </ion-view>
    </script>

    <!-- 销售订单行画面（增行画面）-->
    <script id="SoLine.html" type="text/ng-template">
        <ion-view hide-back-button="true" title="销售订单行">
            <ion-nav-buttons side="left">
                <a class="button button-icon ion-arrow-left-c" ng-click="solinecanceloption()"></a>
            </ion-nav-buttons>
            <!--ion-nav-buttons  side="left"-->
            <!--a class="button button-icon ion-arrow-left-c"  ng-click="solinegoback()"></a-->
            <!--/ion-nav-buttons-->
            <!--ion-nav-buttons  side="right"-->
            <!--a class="button"  ng-click="solinecanceloption()">取消</a-->
            <!--/ion-nav-buttons-->
            <ion-nav-buttons side="right">
                <a class="button" ng-click="solinegoback()">确定</a>
            </ion-nav-buttons>
            <ion-content>
                <div class="list">
                    <label class="item item-input">
                        <span class="list-lable-fix" style="width:30%;">行号</span>
                        <!--input type="text" readonly="readonly" value="{{soline.doclineno}}" /-->
                        <span class="list-value-fix" style="width:60%;">{{soline.doclineno}}</span>
                    </label>

                    <label class="item item-input">
                        <span class="list-lable-fix" style="width:30%;">物料编码</span>
                        <input type="text" readonly="readonly" value="{{soline.itemcode}}" style="flex-basis:50%;"/>
                    </label>

                    <div class="item item-input">
                        <div style="float:right" ng-show="visibile">{{soline.itemid}}</div>
                        <div style="float:right" ng-show="visibile">{{soline.puid}}</div>
                        <div style="float:right" ng-show="visibile">{{soline.pucode}}</div>
                        <div style="float:right" ng-show="visibile">{{soline.puname}}</div>
                        <div style="float:right" ng-show="visibile">{{soline.presion}}</div>
                        <span class="list-lable-fix" style="width:30%;">物料名称</span>
                        <input type="text" readonly="readonly" value="{{soline.itemname}}" style="flex-basis:50%;"/>
                        <button class="button button-clear button-dark"
                                style="width:20%;position:absolute;right:0px;top:0px;"
                                ng-click="SoLineGoItemPage()">
                            <i class="icon ion-ios-arrow-right"></i>
                        </button>
                    </div>
                    <label class="item item-input ">
                        <span class="input-label " style="font-size:16px;font-weight:normal;width:30%;">数量({{soline.puname}})</span>
                        <input type="number" min="0" ng-model="soline.orderbyqty" ng-change="calqtytotalmoney()"
                               ng-focus="qtytotalmoney()"/>
                    </label>
                    <label class="item item-input ">
                        <span class="input-label " style="font-size:16px;font-weight:normal;width:30%;">单价({{currencysymbol}})</span>
                        <input type="number" min="0" ng-model="soline.price" name="soline.price"
                               ng-change="calpricetotalmoney()" ng-focus="pricetotalmoney()"/>
                    </label>
                    <label class="item item-input ">
                        <span class="input-label " style="font-size:16px;font-weight:normal;width:30%;">交期</span>


                        <label style="width:50%;">{{soline.requiredate}}</label>

                        <button id="soline.requiredate" class="button button-icon ion-calendar"
                                style="font-size:30px;border:0px;width:20%;"
                                ng-click="selectMyDate($event)">
                        </button>

                    </label>
                    <label class="item item-input">
                        <span class="list-lable-fix" style="width:30%;">合计金额（{{currencysymbol}}）</span>
                        <input type="text" readonly="readonly" value="{{soline.totalmoney}}"/>
                    </label>
                </div>
            </ion-content>
            <!--div class="bar bar-footer bar-light"-->
            <!--div class="button-bar"-->
            <!--a class="button button-positive" ng-click="SoLineAddLine()">增 行</a-->
            <!--/div-->
            <!--div class="button-bar"-->
            <!--a class="button button-positive" ng-click="SoLineconfirmCreateOrder()">保 存</a-->
            <!--/div-->
            <!--/div-->
        </ion-view>
    </script>

    <!-- 客户画面-->
    <script id="Customer.html" type="text/ng-template">
        <ion-view title="客户档案">
            <ion-header-bar class="bar-subheader search-bar">
                <div class="item-input-inset" style="padding: 0">
                    <label class="item item-input item-select select-style-fix">
                        <select ng-init="initdata()" ng-model="test.code" ng-change="changeItem()">
                            <option ng-repeat="m in companylist" value="{{m.code}}" ng-selected="m.code==test.code">
                                {{m.name}}
                            </option>
                        </select>
                    </label>

                    <div class="item-input-wrapper wrapper-fix">
                        <label class="item-input-wrapper" style="background: transparent;">
                            <i class="icon ion-ios-search placeholder-icon"></i>
                            <input type="search" placeholder="搜索客户" ng-model="data.Customersearch_Condition"></label>
                        <button class="button button-small search-button" ng-click="searchCustomerCondition()">查 询
                        </button>
                    </div>
                </div>
            </ion-header-bar>
            <ion-content>
                <!--<div class="item item-icon-right item-padding-fix" style="padding:0px;border:none;">-->
                <div class="list" style="padding:0px;border:none;">
                    <div class="item item-icon-right item-padding-fix" ng-repeat="x in queryCustomerData"
                         ng-click="sendcustomerId($index)">
                        <div class="row row-fix">
                            <div class="col">{{x.Code}}</div>
                            <div class="col col-fix">{{x.ShortName}}</div>
                        </div>
                        <div class="row row-fix">
                            <div class="col">{{x.Name}}</div>
                            <div class="col col-fix"></div>
                        </div>
                        <div class="row row-fix" style="width:0%;display:none;">
                            <div class="col">{{x.ID}}</div>
                            <div class="col col-fix">{{x.CurrencyID}}</div>
                        </div>
                        <div class="row row-fix" style="width:0%;display:none;">
                            <div class="col">{{x.CurrencyCode}}</div>
                            <div class="col col-fix">{{x.CurrencyName}}</div>
                        </div>
                    </div>
                </div>
                <!--</div>-->
            </ion-content>
        </ion-view>
    </script>

    <!--料品选择-->
    <script id="Item.html" type="text/ng-template">
        <ion-view title="物料档案">
            <div class="bar bar-subheader" style="top: 37px;border-bottom: none;padding: 5px 0;display: block;">
                <div class="bar bar-header item-input-inset">
                    <label class="item item-input item-select select-style-fix" style="width:130px">
                        <select ng-init="inititemdata()" ng-model="item.code" ng-change="changeItem()">
                            <option ng-repeat="m in itemcompanylist" value="{{m.code}}" ng-selected="m.code==item.code">
                                {{m.name}}
                            </option>
                        </select>
                    </label>

                    <div class="item-input-wrapper wrapper-fix">
                        <label class="item-input-wrapper">
                            <i class="icon ion-ios-search placeholder-icon"></i>
                            <input type="search" placeholder="搜索物料" ng-model="data.search_Condition"></label>
                        <button class="button button-small button-positive" ng-click="searchCondition()">查 询</button>
                    </div>
                </div>
            </div>
            <ion-content style="top:100px">
                <div class="item item-icon-right item-padding-fix" style="padding:0px;border:none;">
                    <div class="list" style="padding:0px;border:none;">
                        <a ng-repeat="x in queryItemData" class="item item-icon-right item-padding-fix"
                           ng-click="sendItemId($index)">
                            <div class="row row-fix">
                                <div class="col">{{x.Code}}</div>
                                <div class="col col-fix">{{x.Id}}</div>
                            </div>
                            <div class="row row-fix">
                                <div class="col">{{x.Name}}</div>
                                <div class="col col-fix"></div>
                            </div>
                            <div class="row row-fix" style="width:0%;display:none;">
                                <div class="col">{{x.UomID}}</div>
                                <div class="col col-fix">{{x.UomCode}}</div>
                            </div>
                            <div class="row row-fix" style="width:0%;display:none;">
                                <div class="col">{{x.UomName}}</div>
                                <div class="col col-fix">{{x.UomPres}}</div>
                            </div>
                        </a>
                    </div>
                </div>
            </ion-content>
        </ion-view>
    </script>

</form>

</body>
</html>